package com.seckill.system.api;

import com.seckill.common.core.constant.ServiceNameConstants;
import com.seckill.system.api.domain.Seckill;
import com.seckill.system.api.domain.TbSku;
import com.seckill.system.api.factory.RemoteFileFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "remoteGoodsService", value = ServiceNameConstants.GOODS_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteGoodsService {

    @GetMapping("listgoods")
    public List<TbSku> listgoods();


    //根据状态查询秒杀列表
    @GetMapping("/seckill/getListStatus")
    public List<Seckill> getListStatus(@RequestParam("status") Integer status);

    //修改秒杀商品状态
    @GetMapping("/seckill/updateSeckillStatus")
    public boolean updateSeckillStatus(@RequestParam("status") Integer status,@RequestParam("skuId") Long skuId);
}
